<template>
	<view  v-if="item.categoryName"  class="homeCategory">
		<home-cate-title 
		:link="item.link"
		:categoryName="item.categoryName"></home-cate-title>
		<home-card :largeCard="item.largeCard" v-if="item.largeCard"></home-card>
		<view class="produceList" v-if="item.smallCardList">
			<home-product class="pro" v-for="(item,index) in item.smallCardList" :key="index" :produce="item"></home-product>
		</view>
		
	</view>
</template>

<script>
	export default{
		props:{
			item:{type:Object}
		}
	}
</script>

<style lang="scss">
	.homeCategory{
		padding: 0 $uni-spacing-row-base;
		margin-top: $uni-spacing-row-base;
		.pro{
			margin-top: 20rpx;
			padding: 0;
		}
		// 2的倍数个多一个间距
		.pro:nth-of-type(2n){
			margin-left: 18rpx;
			
		}
	}
	.produceList{
		display: flex;
		flex-wrap: wrap;
	}
	
</style>